
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <title>食用指南 | Hexo</title>
    <meta name="author" content="John Doe" />
    <meta name="description" content="" />
    <meta name="keywords" content="" />
    <meta
        name="viewport"
        content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
    />
    <link rel="icon" href="/images/avatar.jpg" />
    <link rel="preconnect" href="https://s4.zstatic.net" />
<script src="https://s4.zstatic.net/ajax/libs/vue/3.3.7/vue.global.prod.min.js"></script>
<link rel="stylesheet" href="https://s4.zstatic.net/ajax/libs/font-awesome/6.4.2/css/all.min.css" />
<link rel="preconnect" href="https://fonts.googleapis.cn" />
<link rel="preconnect" href="https://fonts.gstatic.cn" crossorigin />
<link
    rel="stylesheet"
    href="https://fonts.googleapis.cn/css2?family=Fira+Code:wght@400;500;600;700&family=Lexend:wght@400;500;600;700;800;900&family=Noto+Sans+SC:wght@400;500;600;700;800;900&display=swap"
/>
<script> const mixins = {}; </script>

<script src="https://polyfill.alicdn.com/v3/polyfill.min.js?features=default"></script>


<script src="https://s4.zstatic.net/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
<script src="https://s4.zstatic.net/ajax/libs/highlightjs-line-numbers.js/2.8.0/highlightjs-line-numbers.min.js"></script>
<link
    rel="stylesheet"
    href="https://s4.zstatic.net/ajax/libs/highlight.js/11.9.0/styles/github.min.css"
/>
<script src="/js/lib/highlight.js"></script>



<script src="/js/lib/preview.js"></script>









<link rel="stylesheet" href="/css/main.css" />

<meta name="generator" content="Hexo 7.3.0"></head>
<body>
    <div id="layout">
        <transition name="fade">
            <div id="loading" v-show="loading">
                <div id="loading-circle">
                    <h2>LOADING</h2>
                    <p>加载过慢请开启缓存 浏览器默认开启</p>
                    <img src="/images/loading.gif" />
                </div>
            </div>
        </transition>
        <div id="menu" :class="{ hidden: hiddenMenu, 'menu-color': menuColor}">
    <nav id="desktop-menu">
        <a class="title" href="/">
            <span>HEXO</span>
        </a>
        
        <a href="/">
            <i class="fa-solid fa-house fa-fw"></i>
            <span>&ensp;Home</span>
        </a>
        
        <a href="/about">
            <i class="fa-solid fa-id-card fa-fw"></i>
            <span>&ensp;About</span>
        </a>
        
        <a href="/archives">
            <i class="fa-solid fa-box-archive fa-fw"></i>
            <span>&ensp;Archives</span>
        </a>
        
        <a href="/categories">
            <i class="fa-solid fa-bookmark fa-fw"></i>
            <span>&ensp;Categories</span>
        </a>
        
        <a href="/tags">
            <i class="fa-solid fa-tags fa-fw"></i>
            <span>&ensp;Tags</span>
        </a>
        
    </nav>
    <nav id="mobile-menu">
        <div class="title" @click="showMenuItems = !showMenuItems">
            <i class="fa-solid fa-bars fa-fw"></i>
            <span>&emsp;HEXO</span>
        </div>
        <transition name="slide">
            <div class="items" v-show="showMenuItems">
                
                <a href="/">
                    <div class="item">
                        <div style="min-width: 20px; max-width: 50px; width: 10%">
                            <i class="fa-solid fa-house fa-fw"></i>
                        </div>
                        <div style="min-width: 100px; max-width: 150%; width: 20%">Home</div>
                    </div>
                </a>
                
                <a href="/about">
                    <div class="item">
                        <div style="min-width: 20px; max-width: 50px; width: 10%">
                            <i class="fa-solid fa-id-card fa-fw"></i>
                        </div>
                        <div style="min-width: 100px; max-width: 150%; width: 20%">About</div>
                    </div>
                </a>
                
                <a href="/archives">
                    <div class="item">
                        <div style="min-width: 20px; max-width: 50px; width: 10%">
                            <i class="fa-solid fa-box-archive fa-fw"></i>
                        </div>
                        <div style="min-width: 100px; max-width: 150%; width: 20%">Archives</div>
                    </div>
                </a>
                
                <a href="/categories">
                    <div class="item">
                        <div style="min-width: 20px; max-width: 50px; width: 10%">
                            <i class="fa-solid fa-bookmark fa-fw"></i>
                        </div>
                        <div style="min-width: 100px; max-width: 150%; width: 20%">Categories</div>
                    </div>
                </a>
                
                <a href="/tags">
                    <div class="item">
                        <div style="min-width: 20px; max-width: 50px; width: 10%">
                            <i class="fa-solid fa-tags fa-fw"></i>
                        </div>
                        <div style="min-width: 100px; max-width: 150%; width: 20%">Tags</div>
                    </div>
                </a>
                
            </div>
        </transition>
    </nav>
</div>
<transition name="fade">
    <div id="menu-curtain" @click="showMenuItems = !showMenuItems" v-show="showMenuItems"></div>
</transition>

        <div id="main" :class="loading ? 'into-enter-from': 'into-enter-active'">
            <div class="article">
    <div>
        <h1>食用指南</h1>
    </div>
    <div class="info">
        <span class="date">
            <span class="icon">
                <i class="fa-solid fa-calendar fa-fw"></i>
            </span>
            2024/12/7
        </span>
        
        
    </div>
    
    <div class="content" v-pre>
        <span id="more"></span>
<h1 id="Hexo-Theme-ParticleX"><a href="#Hexo-Theme-ParticleX" class="headerlink" title="Hexo-Theme-ParticleX"></a>Hexo-Theme-ParticleX</h1><p><a target="_blank" rel="noopener" href="https://github.com/theme-particlex/hexo-theme-particlex">ParticleX</a> 主题，诞生原因是因为原来的 <a target="_blank" rel="noopener" href="https://github.com/korilin/hexo-theme-particle">Particle</a> 主题不维护了，但是我觉得还是很好的。</p>
<p>原来用的是 Vue 2 + Ant Design Vue 1，现更新到 Vue 3，去除 Ant Design Vue 采用自定义样式，图标更改为 Font Awesome 6，CDN 改为 ZStatic。</p>
<p>原项目 <code>README.md</code> 里说：</p>
<blockquote>
<p>目前有 Full、Night 和 Maiden <strong>两个</strong>主题样式。</p>
</blockquote>
<p>但是更改后只有一种了，如果你想改颜色就在 <code>main.css</code> 里替换吧。</p>
<h1 id="1-演示"><a href="#1-演示" class="headerlink" title="1. 演示"></a>1. 演示</h1><ul>
<li><a target="_blank" rel="noopener" href="https://argvchs.github.io/">GitHub Pages</a></li>
<li><a target="_blank" rel="noopener" href="https://argvchs.netlify.app/">Netlify</a></li>
<li><a target="_blank" rel="noopener" href="https://argvchs.vercel.app/">Vercel</a></li>
</ul>
<h1 id="2-安装"><a href="#2-安装" class="headerlink" title="2. 安装"></a>2. 安装</h1><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> themes</span><br><span class="line">git <span class="built_in">clone</span> https://github.com/theme-particlex/hexo-theme-particlex.git particlex --depth=1</span><br></pre></td></tr></table></figure>

<p>然后在根目录 <code>_config.yml</code> 设置主题为 ParticleX 即可。</p>
<figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">theme:</span> <span class="string">particlex</span></span><br></pre></td></tr></table></figure>

<h2 id="2-1-关闭自带代码高亮"><a href="#2-1-关闭自带代码高亮" class="headerlink" title="2.1. 关闭自带代码高亮"></a>2.1. 关闭自带代码高亮</h2><p>Hexo 有自带的代码高亮，但是和 ParticleX 的不兼容。</p>
<figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">highlight:</span></span><br><span class="line">    <span class="attr">enable:</span> <span class="literal">false</span></span><br><span class="line"><span class="attr">prismjs:</span></span><br><span class="line">    <span class="attr">enable:</span> <span class="literal">false</span></span><br></pre></td></tr></table></figure>

<p>如果使用 Hexo 7.0.0 之后的版本只需要修改为：</p>
<figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">syntax_highlighter:</span></span><br></pre></td></tr></table></figure>

<p>如果使用 Pandoc 还需要设置一下：</p>
<figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">pandoc:</span></span><br><span class="line">    <span class="attr">extra:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">no-highlight:</span></span><br></pre></td></tr></table></figure>

<h2 id="2-2-禁用年度月度归档"><a href="#2-2-禁用年度月度归档" class="headerlink" title="2.2. 禁用年度月度归档"></a>2.2. 禁用年度月度归档</h2><p>Hexo 会自动生成年度月度归档，可是 ParticleX 主题没有这个功能。<del>我太懒了</del></p>
<figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">archive_generator:</span></span><br><span class="line">    <span class="attr">enabled:</span> <span class="literal">true</span></span><br><span class="line">    <span class="attr">per_page:</span> <span class="number">0</span></span><br><span class="line">    <span class="attr">yearly:</span> <span class="literal">false</span></span><br><span class="line">    <span class="attr">monthly:</span> <span class="literal">false</span></span><br><span class="line">    <span class="attr">daily:</span> <span class="literal">false</span></span><br></pre></td></tr></table></figure>

<p>修改完请 <code>hexo cl</code> 清除缓存。</p>
<h1 id="3-配置"><a href="#3-配置" class="headerlink" title="3. 配置"></a>3. 配置</h1><h2 id="3-1-基本配置"><a href="#3-1-基本配置" class="headerlink" title="3.1. 基本配置"></a>3.1. 基本配置</h2><p><code>background</code> 参数是一个列表，打开时会随机加载一个背景。</p>
<figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Avatar image</span></span><br><span class="line"><span class="attr">avatar:</span> <span class="string">/images/avatar.jpg</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Home page background image</span></span><br><span class="line"><span class="attr">background:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">/images/background.jpg</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Loading image</span></span><br><span class="line"><span class="attr">loading:</span> <span class="string">/images/loading.gif</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Optional colors for category and tag</span></span><br><span class="line"><span class="attr">colors:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">&quot;#ffa2c4&quot;</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">&quot;#00bcd4&quot;</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">&quot;#03a9f4&quot;</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">&quot;#00a596&quot;</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">&quot;#ff7d73&quot;</span></span><br></pre></td></tr></table></figure>

<h2 id="3-2-内容配置"><a href="#3-2-内容配置" class="headerlink" title="3.2. 内容配置"></a>3.2. 内容配置</h2><h3 id="3-2-1-导航栏"><a href="#3-2-1-导航栏" class="headerlink" title="3.2.1. 导航栏"></a>3.2.1. 导航栏</h3><p>为了方便，主题使用的图标是 Font Awesome 6 图标。</p>
<figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># ParticleX theme icon is adopts the Font Awesome 6</span></span><br><span class="line"><span class="comment"># https://fontawesome.com</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Main menu navigation</span></span><br><span class="line"><span class="attr">menu:</span></span><br><span class="line">    <span class="attr">Home:</span></span><br><span class="line">        <span class="attr">name:</span> <span class="string">house</span></span><br><span class="line">        <span class="attr">theme:</span> <span class="string">solid</span></span><br><span class="line">        <span class="attr">link:</span> <span class="string">/</span></span><br><span class="line">    <span class="attr">About:</span></span><br><span class="line">        <span class="attr">name:</span> <span class="string">id-card</span></span><br><span class="line">        <span class="attr">theme:</span> <span class="string">solid</span></span><br><span class="line">        <span class="attr">link:</span> <span class="string">/about</span></span><br><span class="line">    <span class="attr">Archives:</span></span><br><span class="line">        <span class="attr">name:</span> <span class="string">box-archive</span></span><br><span class="line">        <span class="attr">theme:</span> <span class="string">solid</span></span><br><span class="line">        <span class="attr">link:</span> <span class="string">/archives</span></span><br><span class="line">    <span class="attr">Categories:</span></span><br><span class="line">        <span class="attr">name:</span> <span class="string">bookmark</span></span><br><span class="line">        <span class="attr">theme:</span> <span class="string">solid</span></span><br><span class="line">        <span class="attr">link:</span> <span class="string">/categories</span></span><br><span class="line">    <span class="attr">Tags:</span></span><br><span class="line">        <span class="attr">name:</span> <span class="string">tags</span></span><br><span class="line">        <span class="attr">theme:</span> <span class="string">solid</span></span><br><span class="line">        <span class="attr">link:</span> <span class="string">/tags</span></span><br></pre></td></tr></table></figure>

<h3 id="3-2-2-主页信息卡片"><a href="#3-2-2-主页信息卡片" class="headerlink" title="3.2.2. 主页信息卡片"></a>3.2.2. 主页信息卡片</h3><p><code>description</code> 支持 Markdown 格式。</p>
<p>图标链接 <code>iconLinks</code> 配置和导航栏配置相同。</p>
<figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Side info card</span></span><br><span class="line"><span class="attr">card:</span></span><br><span class="line">    <span class="attr">enable:</span> <span class="literal">true</span></span><br><span class="line">    <span class="attr">description:</span> <span class="string">|</span></span><br><span class="line"><span class="string">        Description</span></span><br><span class="line"><span class="string">        ...</span></span><br><span class="line"><span class="string"></span>    <span class="attr">iconLinks:</span></span><br><span class="line">    <span class="attr">friendLinks:</span></span><br><span class="line">        <span class="attr">Argvchs:</span> <span class="string">https://argvchs.github.io</span></span><br></pre></td></tr></table></figure>

<h3 id="3-2-3-页脚"><a href="#3-2-3-页脚" class="headerlink" title="3.2.3. 页脚"></a>3.2.3. 页脚</h3><p>考虑到博客部署在服务器并使用自己域名的情况，按规定需要在网站下边添加备案消息。</p>
<p>如没有需要显示备案消息的可以关闭。</p>
<figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Footer info</span></span><br><span class="line"><span class="attr">footer:</span></span><br><span class="line">    <span class="attr">since:</span> <span class="number">2022</span></span><br><span class="line">    <span class="comment"># Customize the server domain name ICP</span></span><br><span class="line">    <span class="attr">ICP:</span></span><br><span class="line">        <span class="attr">enable:</span> <span class="literal">false</span></span><br><span class="line">        <span class="attr">code:</span></span><br><span class="line">        <span class="attr">link:</span></span><br></pre></td></tr></table></figure>

<h2 id="3-3-功能配置"><a href="#3-3-功能配置" class="headerlink" title="3.3. 功能配置"></a>3.3. 功能配置</h2><h3 id="3-3-1-Polyfill"><a href="#3-3-1-Polyfill" class="headerlink" title="3.3.1. Polyfill"></a>3.3.1. Polyfill</h3><p>使用 <a target="_blank" rel="noopener" href="https://polyfill.io/">Polyfill.io</a> 自动根据 UA 处理新的 JS API 兼容。</p>
<p>可以配合 <a target="_blank" rel="noopener" href="https://github.com/theme-particlex/hexo-babel">Hexo-Babel</a> 插件处理 JS 语法兼容。</p>
<p>Polyfill 在国内一些省份被墙，这里换成了阿里的 <a target="_blank" rel="noopener" href="https://polyfill.alicdn.com/">Polyfill</a>。</p>
<figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Polyfill</span></span><br><span class="line"><span class="comment"># https://polyfill.io</span></span><br><span class="line"><span class="attr">polyfill:</span></span><br><span class="line">    <span class="attr">enable:</span> <span class="literal">true</span></span><br><span class="line">    <span class="attr">features:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="string">default</span></span><br></pre></td></tr></table></figure>

<h3 id="3-3-2-代码高亮"><a href="#3-3-2-代码高亮" class="headerlink" title="3.3.2. 代码高亮"></a>3.3.2. 代码高亮</h3><p>使用 Highlight.js 代码高亮。</p>
<p>样式可以在<a target="_blank" rel="noopener" href="https://highlightjs.org/static/demo">这里</a>选择，默认为 GitHub。</p>
<figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Highlight.js</span></span><br><span class="line"><span class="comment"># https://highlightjs.org</span></span><br><span class="line"><span class="attr">highlight:</span></span><br><span class="line">    <span class="attr">enable:</span> <span class="literal">true</span></span><br><span class="line">    <span class="attr">style:</span> <span class="string">github</span></span><br></pre></td></tr></table></figure>

<h3 id="3-3-3-数学渲染"><a href="#3-3-3-数学渲染" class="headerlink" title="3.3.3. 数学渲染"></a>3.3.3. 数学渲染</h3><p>使用 KaTeX 渲染数学公式。</p>
<figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># KaTeX math rendering</span></span><br><span class="line"><span class="attr">math:</span></span><br><span class="line">    <span class="attr">enable:</span> <span class="literal">false</span></span><br></pre></td></tr></table></figure>

<h3 id="3-3-4-图片预览"><a href="#3-3-4-图片预览" class="headerlink" title="3.3.4. 图片预览"></a>3.3.4. 图片预览</h3><p>简单的点击图片放大缩小的预览。</p>
<figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Image preview</span></span><br><span class="line"><span class="attr">preview:</span></span><br><span class="line">    <span class="attr">enable:</span> <span class="literal">true</span></span><br></pre></td></tr></table></figure>

<h3 id="3-3-5-文章缩略"><a href="#3-3-5-文章缩略" class="headerlink" title="3.3.5. 文章缩略"></a>3.3.5. 文章缩略</h3><p>一般来说，缩略展示文档只需要在文档中添加 <code>&lt;!-- more --&gt;</code> 即可，缩略内容在显示全文中也会出现。</p>
<p>但考虑到不想把缩略内容放在正文里，就添加了此参数，在 <a target="_blank" rel="noopener" href="https://hexo.io/docs/front-matter">Front-Matter</a> 里设置。</p>
<p>支持 Markdown 格式。</p>
<figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">description:</span> <span class="string">|</span></span><br><span class="line">    <span class="string">Normal</span> <span class="string">_Italic_</span> <span class="string">**Strong**</span></span><br></pre></td></tr></table></figure>

<h3 id="3-3-6-文章置顶"><a href="#3-3-6-文章置顶" class="headerlink" title="3.3.6. 文章置顶"></a>3.3.6. 文章置顶</h3><p>在 <a target="_blank" rel="noopener" href="https://hexo.io/docs/front-matter">Front-Matter</a> 里设置 <code>pinned</code> 作为置顶参数，越大越靠前，默认为 0。</p>
<h3 id="3-3-7-文章加密"><a href="#3-3-7-文章加密" class="headerlink" title="3.3.7. 文章加密"></a>3.3.7. 文章加密</h3><p>使用 AES 加密算法，在 <a target="_blank" rel="noopener" href="https://hexo.io/docs/front-matter">Front-Matter</a> 里设置 <code>secret</code> 作为密码，**使用请安装插件 <a target="_blank" rel="noopener" href="https://github.com/theme-particlex/hexo-helper-crypto">Hexo-Helper-Crypto</a>**。</p>
<figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Article encryption</span></span><br><span class="line"><span class="attr">crypto:</span></span><br><span class="line">    <span class="attr">enable:</span> <span class="literal">false</span></span><br></pre></td></tr></table></figure>

<h3 id="3-3-8-搜索"><a href="#3-3-8-搜索" class="headerlink" title="3.3.8. 搜索"></a>3.3.8. 搜索</h3><p>嵌入到 Archives 中的搜索。</p>
<p>目前只支持搜索文档标题。</p>
<figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Search</span></span><br><span class="line"><span class="attr">search:</span></span><br><span class="line">    <span class="attr">enable:</span> <span class="literal">false</span></span><br></pre></td></tr></table></figure>

<h2 id="3-4-评论配置"><a href="#3-4-评论配置" class="headerlink" title="3.4. 评论配置"></a>3.4. 评论配置</h2><h3 id="3-4-1-giscus"><a href="#3-4-1-giscus" class="headerlink" title="3.4.1. giscus"></a>3.4.1. giscus</h3><p>giscus 是一个由 GitHub Discussions 支持的评论系统。</p>
<p>在 <a target="_blank" rel="noopener" href="https://giscus.app/">giscus.app</a> 设置好各项后，会在下面生成一个 <code>&lt;script&gt;</code> 标签，在主题内填入即可。</p>
<figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># giscus</span></span><br><span class="line"><span class="comment"># https://github.com/giscus/giscus</span></span><br><span class="line"><span class="attr">giscus:</span></span><br><span class="line">    <span class="attr">enable:</span> <span class="literal">false</span></span><br><span class="line">    <span class="attr">src:</span> <span class="string">https://giscus.app/client.js</span></span><br><span class="line">    <span class="attr">repo:</span></span><br><span class="line">    <span class="attr">repoID:</span></span><br><span class="line">    <span class="attr">category:</span></span><br><span class="line">    <span class="attr">categoryID:</span></span><br><span class="line">    <span class="attr">mapping:</span> <span class="string">pathname</span></span><br><span class="line">    <span class="attr">strict:</span> <span class="number">0</span></span><br><span class="line">    <span class="attr">reactionsEnabled:</span> <span class="number">1</span></span><br><span class="line">    <span class="attr">emitMetadata:</span> <span class="number">0</span></span><br><span class="line">    <span class="attr">inputPosition:</span> <span class="string">bottom</span></span><br><span class="line">    <span class="attr">theme:</span> <span class="string">preferred_color_scheme</span></span><br><span class="line">    <span class="attr">lang:</span></span><br></pre></td></tr></table></figure>

<h3 id="3-4-2-Gitalk"><a href="#3-4-2-Gitalk" class="headerlink" title="3.4.2. Gitalk"></a>3.4.2. Gitalk</h3><p>Gitalk 是一个基于 GitHub Issue 和 Preact 的评论系统。</p>
<p>由于 Gitalk 官方 CORS 代理用的是 Cloudflare，速度过慢，搭建 CORS 代理可以看<a target="_blank" rel="noopener" href="https://argvchs.github.io/2022/07/04/build-cors-anywhere">这篇文章</a>。</p>
<figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Gitalk</span></span><br><span class="line"><span class="comment"># https://github.com/gitalk/gitalk</span></span><br><span class="line"><span class="attr">gitalk:</span></span><br><span class="line">    <span class="attr">enable:</span> <span class="literal">false</span></span><br><span class="line">    <span class="attr">clientID:</span> <span class="comment"># Default ClientID</span></span><br><span class="line">    <span class="attr">clientSecret:</span> <span class="comment"># Default ClientSecret</span></span><br><span class="line">    <span class="attr">repo:</span> <span class="comment"># The name of repository of store comments</span></span><br><span class="line">    <span class="attr">owner:</span> <span class="comment"># GitHub repo owner</span></span><br><span class="line">    <span class="attr">admin:</span> <span class="comment"># GitHub repo owner and collaborators, only these guys can initialize github issues</span></span><br><span class="line">    <span class="attr">language:</span> <span class="comment"># en, zh-CN, zh-TW, es-ES, fr, ru, de, pl and ko are currently available</span></span><br><span class="line">    <span class="attr">proxy:</span> <span class="comment"># CORS proxy</span></span><br></pre></td></tr></table></figure>

<h3 id="3-4-3-Waline"><a href="#3-4-3-Waline" class="headerlink" title="3.4.3. Waline"></a>3.4.3. Waline</h3><p>Waline 是一个简单、安全的评论系统。</p>
<p>详见：<a target="_blank" rel="noopener" href="https://blog.yuzi.dev/posts/bcb4ff00.html">在 ParticleX 上使用 Waline | Yuzi’s Blog</a></p>
<figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Waline</span></span><br><span class="line"><span class="comment"># https://github.com/walinejs/waline</span></span><br><span class="line"><span class="attr">waline:</span></span><br><span class="line">    <span class="attr">enable:</span> <span class="literal">false</span></span><br><span class="line">    <span class="attr">serverURL:</span> <span class="comment"># Waline server address url, you should set this to your own link</span></span><br><span class="line">    <span class="attr">locale:</span> <span class="comment"># Locale: https://waline.js.org/guide/client/i18n.html#locale-option</span></span><br><span class="line">    <span class="attr">commentCount:</span> <span class="literal">true</span> <span class="comment"># If false, comment count will only be displayed in post page, not in home page</span></span><br><span class="line">    <span class="attr">pageview:</span> <span class="literal">false</span> <span class="comment"># Pageviews count, <span class="doctag">Note:</span> You should not enable both `waline.pageview` and `leancloud_visitors`</span></span><br><span class="line">    <span class="attr">emoji:</span> <span class="comment"># Custom emoji</span></span><br><span class="line">        <span class="bullet">-</span> <span class="string">https://unpkg.com/@waline/emojis@1.2.0/weibo</span></span><br><span class="line">        <span class="bullet">-</span> <span class="string">https://unpkg.com/@waline/emojis@1.2.0/alus</span></span><br><span class="line">        <span class="bullet">-</span> <span class="string">https://unpkg.com/@waline/emojis@1.2.0/bilibili</span></span><br><span class="line">        <span class="bullet">-</span> <span class="string">https://unpkg.com/@waline/emojis@1.2.0/qq</span></span><br><span class="line">        <span class="bullet">-</span> <span class="string">https://unpkg.com/@waline/emojis@1.2.0/tieba</span></span><br><span class="line">        <span class="bullet">-</span> <span class="string">https://unpkg.com/@waline/emojis@1.2.0/tw-emoji</span></span><br><span class="line">    <span class="attr">meta:</span> <span class="comment"># Comment information, valid meta are nick, mail and link</span></span><br><span class="line">        <span class="bullet">-</span> <span class="string">nick</span></span><br><span class="line">        <span class="bullet">-</span> <span class="string">mail</span></span><br><span class="line">        <span class="bullet">-</span> <span class="string">link</span></span><br><span class="line">    <span class="attr">requiredMeta:</span> <span class="comment"># Set required meta field, e.g.: [nick] | [nick, mail]</span></span><br><span class="line">        <span class="bullet">-</span> <span class="string">nick</span></span><br><span class="line">    <span class="attr">lang:</span> <span class="comment"># Language, available values: en-US, zh-CN, zh-TW, pt-BR, ru-RU, jp-JP</span></span><br><span class="line">    <span class="attr">wordLimit:</span> <span class="number">0</span> <span class="comment"># Word limit, no limit when setting to 0</span></span><br><span class="line">    <span class="attr">login:</span> <span class="string">enable</span> <span class="comment"># Whether enable login, can choose from &#x27;enable&#x27;, &#x27;disable&#x27; and &#x27;force&#x27;</span></span><br><span class="line">    <span class="attr">pageSize:</span> <span class="number">10</span> <span class="comment"># Comment per page</span></span><br></pre></td></tr></table></figure>

<h3 id="3-4-4-Twikoo"><a href="#3-4-4-Twikoo" class="headerlink" title="3.4.4. Twikoo"></a>3.4.4. Twikoo</h3><p>Twikoo 是一个一个简洁、安全、免费的静态网站评论系统。</p>
<figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Twikoo</span></span><br><span class="line"><span class="comment"># https://github.com/imaegoo/twikoo</span></span><br><span class="line"><span class="attr">twikoo:</span></span><br><span class="line">    <span class="attr">enable:</span> <span class="literal">false</span></span><br><span class="line">    <span class="attr">envID:</span></span><br><span class="line">    <span class="attr">region:</span></span><br><span class="line">    <span class="attr">path:</span> <span class="string">location.pathname</span></span><br><span class="line">    <span class="attr">lang:</span></span><br></pre></td></tr></table></figure>

<h1 id="4-写在最后"><a href="#4-写在最后" class="headerlink" title="4. 写在最后"></a>4. 写在最后</h1><p>本项目采用 MIT 开源许可证，欢迎大家贡献，你可以随意打开一个 Issue 来进行提问，有任何改进想法都可以进行 Fork，期待您的 Pull Request！</p>

    </div>
    
    
    
    
    
    
    
</div>

            <footer id="footer">
    <div id="footer-wrap">
        <div>
            &copy;
            2022 - 2024 Hexo
            <span id="footer-icon">
                <i class="fa-solid fa-font-awesome fa-fw"></i>
            </span>
            &commat;John Doe
        </div>
        <div>
            Based on the <a target="_blank" rel="noopener" href="https://hexo.io">Hexo Engine</a> &amp;
            <a target="_blank" rel="noopener" href="https://github.com/theme-particlex/hexo-theme-particlex">ParticleX Theme</a>
        </div>
        
    </div>
</footer>

        </div>
        
        <transition name="fade">
            <div id="preview" ref="preview" v-show="previewShow">
                <img id="preview-content" ref="previewContent" />
            </div>
        </transition>
        
    </div>
    <script src="/js/main.js"></script>
    
    




    
</body>
</html>
